package com.neutech.solar.client;

import com.neutech.solar.entity.Background;
import com.neutech.solar.entity.Planet;
import com.neutech.solar.entity.Sun;
import com.neutech.solar.util.SolarSystemFrame;

import java.awt.*;

/**
 * 执行类
 * @author 刘昱含
 * @date 2021/7/22 9:43
 */
public class SolarSystemClient extends SolarSystemFrame {

    public Background bg = new Background();

    public Sun sun = new Sun();

    public Planet Mercury = new Planet("水星","Mercury.png",0.387,88,0.2056);
    public Planet Venus = new Planet("金星","Venus.png",0.72,225,0.0068);
    public Planet earth = new Planet("地球","Earth.png",1,365,0.0167);
    public Planet Mars = new Planet("火星","Mars.png",1.52,687,0.0943);
    public Planet Jupiter = new Planet("木星","Jupiter.png",4.2,4330,0.0489);
    public Planet Saturn = new Planet("土星","Saturn.png",7.54,10832,0.0557);
    public Planet Uranus = new Planet("天王星","Uranus.png",9.218,30777,0.0444);
    public Planet Neptune = new Planet("海王星","Neptune.png",11.06,60328,0.0112);
    @Override
    public void paint(Graphics g) {
        bg.draw(g);
        sun.draw(g);
        Mercury.draw(g);
        Venus.draw(g);
        earth.draw(g);
        Mars.draw(g);
        Jupiter.draw(g);
        Saturn.draw(g);
        Uranus.draw(g);
        Neptune.draw(g);
    }

    public static void main(String[] args) {
        new SolarSystemClient().init("太阳系八行星");
    }
}
